package com.ksm.zyz.sys.service.impl;


import com.ksm.zyz.common.base.BaseServiceImpl;
import com.ksm.zyz.sys.entity.CheckBox;
import com.ksm.zyz.sys.entity.SysPermission;
import com.ksm.zyz.sys.entity.SysRolePermission;
import com.ksm.zyz.sys.mapper.SysRolePermMapper;
import com.ksm.zyz.sys.service.SysRolePermService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("sysRolePermService")
public class SysRolePermServiceImpl extends BaseServiceImpl<SysRolePermission> implements SysRolePermService {
	
	@Autowired
	private SysRolePermMapper sysRolePermMapper;


	@Override
	public List<CheckBox> getPermission(String roleId) {
		return sysRolePermMapper.getPermission(roleId);
	}

	@Override
	public void savePermission(List<SysRolePermission> list) {
		sysRolePermMapper.savePermission(list);
	}

	@Override
	public List<SysPermission> selectButton(String roleId, String parentId) {
		return sysRolePermMapper.selectButton(roleId,parentId);
	}


}
